<?php
	include_once("./dal/UserDAL.php");
	include_once("./dal/RoleDAL.php");

	$currentUrl = basename($_SERVER['PHP_SELF']);
	//print_r($currentUrl);
	$currentUrlWithQuery = strlen($_SERVER['QUERY_STRING']) ? basename($_SERVER['PHP_SELF'])."?".$_SERVER['QUERY_STRING'] : basename($_SERVER['PHP_SELF']);
	
	$username = "";
	$currentUser = null;
	
	if(isLoggedIn())
	{
		$username = getUsername();
		$currentUser = retrieveUser($username);	
	}
	
	function checkUserRole($role)
	{
		global $username;
		
		return userHasRole($username,$role);
	}
	
?>